# -*— coding:utf-8 -*-
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.core.mail import send_mail



def send(request):
	return render_to_response('send.html')

def confirmsend(request):
		request.encoding = 'utf-8'
		if 'sendmail' and 'subject' and 'messages' in request.GET:
			 send_mail(request.GET['subject'],request.GET['messages'],'TCTEST<13276022792@sina.cn>',['<'+request.GET['sendmail']+'>'],fail_silently = False)
			 message = '信息提交成功，正在发送 至.\n'+request.GET['sendmail'].encode('utf-8')
			 return HttpResponse(message)
		else:
			 message = '请填写全部信息.\n'
			 return HttpResponse(message)
    